Loading
Scriptbox
 VBScript Links 
 About VBscript 
 JavaScript Links 
 About JavaScript 
 Powershell Links 
 PSCRIPT the Script Launcher 
 PowerShell Shortcut Keys 
 About Powershell 
     VBScript
    JavaScript
    Powershell
Disclaimer
Contact
Latest 10 Scripts
Script search
  :: { Category } :: 0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ
         

Search Options:  List  the  Subnets  in  an  Active  Directory  Site  

 Content of List the Subnets in an Active Directory Site.vbs
MD5 Hash: 4D25E7CA8C0439175D0CEFC9F6DC582B
' Description: Lists subnets in a specified Active Directory site.


strSiteRDN = "cn=Ga-Atl-Sales"

Set objRootDSE = GetObject("LDAP://RootDSE")
strConfigurationNC = objRootDSE.Get("configurationNamingContext")

strSitePath = "LDAP://" & strSiteRDN & ",cn=Sites," & strConfigurationNC

Set objSite = GetObject(strSitePath)

objSite.GetInfoEx Array("siteObjectBL"), 0
arrSiteObjectBL = objSite.GetEx("siteObjectBL")

WScript.Echo strSiteRDN & " Subnets" & vbCrLf & _
String(Len(strSiteRDN) + 8, "-")

For Each strSiteObjectBL In arrSiteObjectBL
WScript.Echo Split(Split(strSiteObjectBL, ",")(0), "=")(1)
Next

   © 2008 - 2013 Boris Toll      :: Scripts available: 6.481 ::      :: scriptbox.toll.at ::      :: powered by www.toll.at ::
  Google Entries:n/a
  Yahoo Backlinks:n/a
  Live Backlinks:n/a
  del.icio.us Bookmarks:n/a
  Technorati Links:n/a